package com.woniuxy.aop;

//import org.aopalliance.intercept.Joinpoint;

import org.aspectj.lang.JoinPoint;

/**
 * @author: wgt
 * Date: 2021/11/16:23:39
 * Description:切面类（定义通知）也可以定义切入点
 */
//前置通知
public class MyAspect {
    public void beforeAdvice(JoinPoint joinPoint){
        System.out.println("前置通知模拟");
        System.out.print("目标类"+ joinPoint.getTarget());
        System.out.println(",被增强的目标类对应的方法名："+joinPoint.getSignature().getName());

    }
    //后置通知
    public void afterAdvice(JoinPoint joinPoint){
        System.out.println("后置通知模拟");
        System.out.print("目标类"+ joinPoint.getTarget());
        System.out.println(",被增强的目标类对应的方法名："+joinPoint.getSignature().getName());

    }

}
